package javax.servlet;

import java.util.EventListener;

/**
 * Implementations of this interface recieve notifications about changes
 * to the servlet context of the web application they are part of.
 * To recieve notification events, the implementation class
 * must be configured in the deployment descriptor for the web application.
 *
 * @see ServletContextEvent
 *
 * @since Servlet 2.3
 *
 * @version $Rev: 467553 $ $Date: 2006-10-24 21:01:51 -0700 (Tue, 24 Oct 2006) $
 */
public interface ServletContextListener extends EventListener {
    /**
     * Notification that the web application initialization
     * process is starting.
     * All ServletContextListeners are notified of context
     * initialisation before any filter or servlet in the web
     * application is initialized.
     */
    public void contextInitialized(ServletContextEvent sce);

    /**
     * Notification that the servlet context is about to be shut down. All servlets
     * have been destroy()ed before any ServletContextListeners are notified of context
     * destruction.
     */
    public void contextDestroyed(ServletContextEvent sce);
}

